﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.Site.SetBackMoneyRatioModel>" %>
<%@ Import Namespace="Code.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	设置返点
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>返点配置</legend>
        <%
            var html = "<table class='table'><tr><th></th><th>";
            html += string.Join("</th><th>", Code.BLL.CacheManage.WinModel.OrderBy(p=>p.Key).Select(p => p.Value.Name + "模式").ToArray())+"</th><th>说明</th></tr>";
            var list=Model.Options.GroupBy(p=>p.key).OrderBy(p=>p.Key);
            foreach (var item in list)
            {
                html += string.Format("<tr><td align='right'>{0}:</td><td>", item.Key.GetDetail().Name) + string.Join("</td><td>", item.OrderBy(p => p.WinModelID).Select(p => Html.TextBox(string.Format("Options[{0}].Value", Array.IndexOf(Model.Options, p)), p.Value, new { @class="text80"}).ToHtmlString()).ToArray()) 
                    + string.Format("</td><td align='left'>{0}</td></tr>",item.Key.GetDetail().Remark);
            }
            html += string.Format("<tr><td colspan='{0}'><input type='submit' value='保存'/></td></tr>",Code.BLL.CacheManage.WinModel.Count+2);
            html += "</table>";
             %>
             <%Html.BeginForm(); %>
             <%=html %>
             <%Html.EndForm(); %>
    </fieldset>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
</asp:Content>
